1. Field of the Invention
The present invention relates to a command interpretation system, and more particularly, to a synchronous command interpretation system and method.
2. Description of the Related Art
Processing commands in a data processing system can be accomplished by using one or more command interpretation systems or command processing machines. Each set of commands is typically associated with a particular command interpretation system. Further, each set of commands is typically processed sequentially by its associated command interpretation system.
In some instances, the two sets of commands in the data processing systems need to be processed in parallel with one another. Moreover, the two sets of commands may be required to interact, e.g., a foreground command processing machine that processes commands must switch to a background command processing machine that processes commands before the foreground command processing machine continues processing its commands. In such instances, the command processing machines must be properly synchronized.
Data processing systems synchronize the two command processing machines through the use of co-routines. The co-routines are commands that are inserted into both the foreground command stream and the background command stream. The co-routine commands provide addressing information on where to return processing to in the command stream that currently is not processing.
For example, if a foreground command processing machine must execute four foreground commands, followed by two background commands, before continuing with three foreground commands, a co-routine must be added to the foreground command stream after the four foreground commands and a co-routine must be added to the background command stream after the two background commands. Each co-routine includes information on where to begin processing in the command processing machine that is not currently active. Thus, using co-routines, the two command processing machines are able to process the foreground and background command streams in parallel.
There are, however, drawbacks to the data processing systems using the co-routine approach. Co-routines are not efficient because of the amount of information necessary to provide to a command processing machine before actually beginning processing. Further, co-routines work only with a single pair of command processing machines.
Co-routines are impractical for situations involving the synchronization of more than one foreground command processing machine because the co-routines do not provide an adequate structure for determining the processing order for each of the different command processing machines. For example, co-routines do not provide a structure for synchronizing operation of the background command processing machines with multiple foreground command processing machines.
In sum, current data processing systems are inadequate for handling complex data command streams that require that the use of multiple command processing machines which increase overall command processing throughput. Therefore, there is a need for a new command processing system and method that (1) allows for the use of multiple foreground command processing machines with a background command processing machine that (2) maintains common representation of the background command processing machine while (3) increasing command processing throughput in a data processing system.
A command processing system processes multiple commands in a peripheral system. The commands are from one or more command sources. At least one command source generates one or more local commands for a portion of the peripheral system. Another command source generates global commands for the entire peripheral system.
The command processing system includes a command segregation module and a command integration module. The command segregation module is coupled to receive local and global commands from the command sources. The command segregation module is coupled to the command integration module. The command integration module is coupled to a command decoder. The command decoder is coupled to one or more execution modules.
The command segregation module segregates the commands it receives from the command sources into at least one local command stream and a global command stream. The command segregation module inserts synchronization commands into each of the local command streams. The command segregation module then generates one or more linearized local command streams and a linearized global command stream.
The command integration module receives the linearized local command streams and the linearized global command stream. The command integration module integrates the linearized local command streams with the linearized global command stream. The command integration module generates a single integrated command stream that is sent to the command decoder. The command decoder forwards the integrated command stream to an appropriate execution module for execution.
In one embodiment of the present invention, a process includes receiving a plurality of commands for a peripheral system from a command source. The process segregates the plurality of commands into at least a first command stream and a second command stream. For example, in a graphics peripheral system, a first command stream is associated with the portion of a display region and a second command stream associated with the entire display region. The process interleaves the second command stream with at least one point of the first command stream. Specifically, the process inserts a synchronization command into the first command stream at each point with which it is to be interleaved with the second command stream. The synchronization commands include information to resume execution of the first command stream. The plurality of command streams are then interleaved into a single, linearized command stream. This linearized command stream is now ready for execution by one or more execution modules in the peripheral system.
The present invention includes a system and a method that advantageously allows for processing a global command stream and one or more logical command streams together rather than individually. The present invention beneficially includes a system and a method that takes an application command stream, segregates the global command stream and the one or more local command streams, synchronizes all of the command streams, and then interleaves the command streams together into a single, logical, integrated command stream for execution (or processing). The integrated command stream generated by the present invention advantageously allows for asymmetrical processing such that the global command stream can complete processing without requiring additional information related to the processing of the one or more local command streams. These features increase processing efficiency and speed because all of the command streams may be processed within a single, logical, integrated command stream without requiring any one particular command stream to be completely processed before beginning processing of another command stream.
The features and advantages described in the specification are not all inclusive and, in particular, many additional features and advantages will be apparent to one of ordinary skill in the art in view of the drawings, specification, and claims. Moreover, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter.